home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 8
/
FM Towns Free Software Collection 8.iso
/
fb386
/
eiyoukei
/
typedoc3.bas
< prev
next >
Wrap
BASIC Source File
|
1994-06-01
|
2KB
|
56 lines
10 'SA. "TYPEDOC3.BAS",A
20 ' 91.05.03
30 '
35 ON ERROR GOTO *ERR
40 SCREEN@ 0:PALETTE 8,[64,64,64]:COLOR 7,%8,7,0:TOWNS=1:FMR=0:GOTO 49
48 *FBHG
49 TC24=24:TC23=TC24-1:CONSOLE 0,25,0:CLS:DIM DDOC$(900):C80=80
50 ENDSW=0:I=0:TC24=24:TC23=TC24-1
60 IF DDOC$(0)<>"" THEN 190
70 OPEN "I",#1,"EIYOUKEI.MAN"
80 WHILE NOT EOF(1)
90 LINE INPUT #1,A$:SW1=0
100 IF LEN(A$)>80 THEN SW1=1 ELSE 155
110 S$=MID$(A$,80,1)
115 'IF (S$>=CHR$(&H80) AND S$<=CHR$(&H9F)) OR (S$>=CHR$(&HE0) AND S$<=CHR$(&HFE)) THEN C80=79 ELSE C80=80
120 X$=MID$(A$,1,C80)
150 DDOC$(I)=X$:I=I+1:A$=MID$(A$,C80+1):SW1=0:GOTO 100
155 X$=A$:IF RIGHT$(X$,1)=CHR$(&H0D) THEN X$=LEFT$(X$,LEN(X$)-1)
160 DDOC$(I)=X$:I=I+1
170 WEND
180 EDOC=I:CLOSE #1
200 I=0
210 IF (I MOD TC24)=0 THEN CLS:GOSUB *PAGEPR
220 LOCATE 0,(I MOD TC24):PRINT DDOC$(I);:I=I+1
230 IF ((I-1) MOD TC24)=TC24-1 THEN GOSUB *KAISEKI
240 IF I>EDOC THEN 250 ELSE 210
250 ENDSW=1:I=0:GOSUB *KAISEKI:ENDSW=0:GOTO 210
260 *KAISEKI
270 LOCATE 75,26:ZDOC$=INPUT$(1):IF INKEY$="" THEN 280 ELSE 270
280 IF ZDOC$=CHR$(&H1C) THEN RETURN
290 IF ZDOC$=CHR$(&H1D) THEN IF ENDSW=1 THEN I=TC24*(EDOC \ TC24):ENDSW=0:GOTO 340 ELSE I=I-TC24:GOTO 340
300 IF ZDOC$=CHR$(&H1E) THEN I=0:RETURN
310 IF ZDOC$=CHR$(&H1F) THEN CLS:I=(EDOC \ TC24)*TC24:RETURN
320 IF ZDOC$=CHR$(27) THEN RETURN *DOCPREXIT
330 IF ZDOC$=CHR$(12) THEN RETURN ELSE RETURN
340 I=I-TC24:IF I<0 THEN I=(EDOC \ TC24)*TC24:RETURN
350 *PAGEPR LOCATE 70,25:PRINT USING "PAGE ##";(I \ TC24)+1;:LOCATE 0,0
360 LOCATE 0,25:PRINT "RETURN..NEXT →..NEXT ←..FOWARD ↑..FARST ↓..LAST ESC..END ";:LOCATE 0,0
370 RETURN
380 *DOCPREXIT CLOSE #1:I=0
390 ZDOC$=INKEY$:IF ZDOC$="" THEN 400 ELSE 390
400 CLOSE:RUN "EIYOUKEI.BAS"
500 *ERR
510 IF ERL=40 THEN FMR=1:TOWNS=0:RESUME *FMR
520 PRINT "ERR=";ERR;" ERL=";ERL
610 ON ERROR GOTO 0
620 CLOSE:END
10000 *FMR
10010 SCREEN 6
12510 PALETTE 8,[64,64,64]
12511 PALETTE 1,[0,0,255]:PALETTE 2,[0,255,0]:PALETTE 3,[0,255,255]
12515 PALETTE 4,[255,0,0]:PALETTE 5,[255,0,255]:PALETTE 6,[255,255,0]
12520 PALETTE 7,[64,64,64]
12525 COLOR 7,7,7,4
12530 GOTO *FBHG